from sqlalchemy import Text, String, Integer, SmallInteger, Column
from config.database import Base


class LlmConfig(Base):
    """
    大模型配置表
    """

    __tablename__ = "biz-llm-config"

    id = Column(
        Integer, primary_key=True, autoincrement=True, nullable=False, comment="ID"
    )
    scenario = Column(String(64), nullable=False, comment="场景代码")
    model_name = Column(String(255), nullable=False, comment="模型名称")
    model_desc = Column(String(255), nullable=True, comment="模型描述")
    api_key = Column(String(255), nullable=False, comment="API_KEY")
    base_url = Column(String(255), nullable=False, comment="BASE_URL")
    system_prompt = Column(Text, nullable=False, comment="系统提示词")
    user_prompt = Column(Text, nullable=False, comment="用户提示词模板")
    used = Column(SmallInteger, nullable=True, comment="是否启用")
